package com.wt.单例模式;

public class Test {
    public static void main(String[] args) {
        Single s1 = Single.getSingle();
        Single s2 = Single.getSingle();

        System.out.println(s1 == s2);
        System.out.println(s1.equals(s2));

        Single2 s3 = Single2.getSingle();
        Single2 s4 = Single2.getSingle();

        System.out.println(s3 == s4);
        System.out.println(s3.equals(s4));

        Single3 s5 = Single3.getSingle();
        Single3 s6 = Single3.getSingle();

        System.out.println(s5 == s6);
        System.out.println(s5.equals(s6));
    }
}
